<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'advertise-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array('enctype' => 'multipart/form-data'), 	
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
<!--
	<div class="row">
		<?php echo $form->labelEx($model,'idad'); ?>
		<?php echo $form->textField($model,'idad'); ?>
		<?php echo $form->error($model,'idad'); ?>
	</div>
--->
	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>
<!--
	<div class="row">
		<?php echo $form->labelEx($model,'urlresource'); ?>
		<?php echo $form->textField($model,'urlresource',array('size'=>60,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'urlresource'); ?>
	</div>
-->
	<div class="row">
		<?php echo chtml::label('URL Image','URL Image'); ?>
		<?php $this->widget('CMultiFileUpload', array(
				'name' => 'urlresource',
				'accept' => 'jpg|gif|png', // useful for verifying files
				'duplicate' => 'Duplicate file!', // useful, i think
				'denied' => 'Invalid file type', // useful, i think
			)); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'location'); ?>
		<?php // start demo using listdata CHtml
		$listdata = CHtml::listData($locations,'idposition','adpositionname');
		echo Chtml::activeDropDownList($model,'location'/*<- id value of list */,$listdata);?>
		<!--<?php echo $form->textField($model,'location'); ?>-->
		<?php echo $form->error($model,'location'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->